import request from '@/utils/request'

// 查询所有seat
export function listAllSeat() {
  return request({
    url: '/seat/listAll',
    method: 'get'
  })
}

// 分页查询所有seat
export function listAllSeatByPage(query) {
  return request({
    url: '/seat/page',
    method: 'get',
    params: query
  })
}

// 根据座位ID查询seat
export function getSeatBySeatId(seatId) {
  return request({
    url: '/seat/seat/' + seatId,
    method: 'get'
  })
}

// 修改座位信息
export function updateSeat(data) {
  return request({
    url: '/seat',
    method: 'put',
    data: data
  })
}

// 添加座位信息
export function addSeat(data) {
  return request({
    url: '/seat',
    method: 'post',
    data: data
  })
}

// 删除座位
export function deleteSeat(seatId) {
  return request({
    url: '/seat/deleteSeat/' + seatId,
    method: 'delete'
  })
}
